
#ifndef _1wire_H
#define _1wire_H


/** P R O T O T Y P E S ******************************************************/
void drive_one_wire_low (void);
void drive_one_wire_high (void);
unsigned char read__one_wire (void);
void OW_write_bit (unsigned char write_data);
unsigned char OW_read_bit (void);
unsigned char OW_reset_pulse(void);
void OW_write_byte (unsigned char write_data);
unsigned char OW_read_byte (void);
float Read_Temperature_DS18S20(void);
float Read_Temperature_DS18B20(void);

// 1WIRE 

#define READ_COMMAND_DS2411  	0x33         // Command to read the 64-bit serial number from 1-wire slave device.
#define SKIP_ROM 				0xCC
#define CONVERT_T 				0x44
#define READ_ROM 				0x33
#define READ_SCRATCHPAD 		0xBE

/***********************************/
/*Port definition in file Config.h*/
/***********************************/

#endif
